<?php /*
Template Name: Todo
*/ ?>

<?php get_header(); ?>

<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jeditable.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    
});
</script>

<div id="page">

<h2 class="title-post">Todo</h2>
<br style="clear:both" />

<?php // get the cat-names
	$todo_cat = simpax_todo_cat();
	$todo_fixed = simpax_todo_cat_fixed();
	$todo_new = simpax_todo_cat_new();
	$todo_working = simpax_todo_cat_working();
?>

<?php query_posts("posts_per_page=-1&cat={$todo_new},{$todo_working}&order=DESC"); ?>

<ul class="todo-list" style="list-style: none;">

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<li id="list-<?php the_ID(); ?>">
	<strong>
	<a class="eip-title" id="eip-title-<?php the_ID(); ?>" href="#" onclick="jQuery('li#list-<?php the_ID(); ?>').append('<div class=\'eip-post\' style=\'margin-left: 10px;\' id=\'ajaxpost-<?php the_ID(); ?>\'><p>Loading...</p></div>'); $('div#ajaxpost-<?php the_ID(); ?>').load('<?php bloginfo('stylesheet_directory'); ?>/options/todo/ajax_todo.php?postajax=<?php the_ID(); ?>');">
		&raquo;
	</a>
		<?php the_title(); ?>
	</strong>
	 von 
	<span class="list-author" id="eip-author-<?php the_ID(); ?>">
		<?php the_author(); ?>
	</span>
	 unter 
	<span class="list-cats" id="eip-cat-<?php the_ID(); ?>">
		<?php the_category(','); ?>
	</span>
</li>

<?php endwhile; endif; ?>


</ul>
</div>

<?php get_footer(); ?>